﻿using System.Data;
using System.Text;

namespace FTI
{
    public interface ISource
    {
        /// <summary>
        /// Get the name of a datasource object
        /// </summary>
        string Name { get; }
        /// <summary>
        /// Get the destription of the datasource
        /// </summary>
        string Description { get; }
        /// <summary>
        /// Get the extension used by the source of data
        /// </summary>
        string Extension { get; }
        /// <summary>
        /// Get the encoding so the source is read correctly
        /// </summary>
        Encoding Encoding { get; }
        /// <summary>
        /// Get or Set the location of the datasource
        /// </summary>
        string Location { get; set; }
        /// <summary>
        /// Get or Set a flag that will enable multi-threading for this source.
        /// </summary>
        bool EnableConcurrency { get; set; }
        /// <summary>
        /// Get the flag that determines if the location is local or URI datasource
        /// </summary>
        bool IsRemoteLocation { get; }
        /// <summary>
        /// Get a reference to a logging interface
        /// </summary>
        IEventLogging Log { get; }
        /// <summary>
        /// Query the datasource for information and load it into a dataset
        /// </summary>
        /// <param name="pData">
        /// Reference a dataset that will be filled with one or more tables worth of information
        /// </param>
        /// <returns>returns a successfull result on the status of performing this task</returns>
        bool GetDataFromSource(string path, ref DataSet data);
    }
}
